package com.zczc.web;

import com.zczc.service.MessageUserService;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * @Author:Mark
 * @Description:
 * @Date: Created on 17:06 2018-12-12
 * @Modify by:
 */
@SpringBootTest
@RunWith(SpringRunner.class)
public class RunTestBB {

  @Autowired
  private MessageUserService messageUserService;

  @Test
  public void testaddMessage() throws Exception {
    List<String> messageIds =new ArrayList<>();
    messageIds.add("c4003466-3625-465c-96ed-678e2eab0adc");
    messageIds.add("dbcf5c99-ce91-483b-b7ba-7afafa2b7075");
    List<String> userIds=new ArrayList<>();
    userIds.add("000");
    userIds.add("666");
    String msg=messageUserService.addMessageUser(userIds,messageIds)?"成功":"失败";
    System.out.println(msg);
  }



  @Test
  public void testdelMessage() throws Exception {
    List<String> messageIds =new ArrayList<>();
    messageIds.add("c4003466-3625-465c-96ed-678e2eab0adc");
   // messageIds.add("dbcf5c99-ce91-483b-b7ba-7afafa2b7075");
    /*List<String> userIds=new ArrayList<>();
    userIds.add("000");
    userIds.add("666");*/
    String msg=messageUserService.deleteMessageByMessageIdLogic(messageIds)?"成功":"失败";
    System.out.println(msg);
  }




}
